<%--
  Created by IntelliJ IDEA.
  User: WS
  Date: 2020/3/17
  Time: 14:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>JavaBean保存</title>
</head>
<body>
<%request.setCharacterEncoding("UTF-8");%>
<%--姓名、学号、登录密码、性别、年龄、籍贯、选修课程以及个人简介--%>
<jsp:useBean id="user" scope="session" class="com.study.experiment02.entity.UserBean"/>
<jsp:setProperty name="user" property="name" param="name"/>
<jsp:setProperty name="user" property="stuNo" param="stuNo"/>
<jsp:setProperty name="user" property="pwd" param="pwd"/>
<jsp:setProperty name="user" property="sex" param="sex"/>
<jsp:setProperty name="user" property="age" param="age"/>
<jsp:setProperty name="user" property="birthplace" param="birthplace"/>
<jsp:setProperty name="user" property="electives" param="elective"/>
<jsp:setProperty name="user" property="detail" param="detail"/>
<%
    request.getSession().setAttribute("userRetain", user);
%>
用户:<%=user%>
<a href="${pageContext.request.contextPath}/experiment02/login.jsp">前往登录页面</a>
</body>
</html>


